package com.dmcloud.dm.auth.service;

import org.springframework.security.oauth2.provider.client.JdbcClientDetailsService;

import javax.sql.DataSource;

public class DmClientDetailsService extends JdbcClientDetailsService {

	public DmClientDetailsService(DataSource dataSource) {
		super(dataSource);
	}

	/**
	 * 重写原生方法支持redis缓存
	 *
	 * @param clientId
	 * @return
	 */
//	@Override
//	@SneakyThrows
//	@Cacheable(value = SecurityConstants.CLIENT_DETAILS_KEY, key = "#clientId", unless = "#result == null")
//	public ClientDetails loadClientByClientId(String clientId) {
//		return super.loadClientByClientId(clientId);
//	}
}
